// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DiffEntity.cs" company="SMART business">
//   Copyright (c) 2014 All Rights Reserved
// </copyright>
// <summary>
//   The different entity.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ComparisonTool
{
    /// <summary>
    /// The different entity.
    /// </summary>
    internal class DiffEntity
    {
        protected bool Equals(DiffEntity other)
        {
            return string.Equals(this.LogicalName, other.LogicalName);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }
            if (ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != this.GetType())
            {
                return false;
            }
            return Equals((DiffEntity)obj);
        }

        public override int GetHashCode()
        {
            return this.LogicalName.GetHashCode();
        }

        /// <summary>
        /// Gets or sets the logical name.
        /// </summary>
        public string LogicalName { get; set; }

        /// <summary>
        /// Gets or sets the display name.
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// Gets or sets the is audit enabled.
        /// </summary>
        public string IsAuditEnabled { get; set; }

        /// <summary>
        /// Gets or sets the is duplicate detection enabled.
        /// </summary>
        public string IsDuplicateDetectionEnabled { get; set; }
    }
}